library(plotly)
## Warning: package 'plotly' was built under R version 4.1.1
## Loading required package: ggplot2
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
fig <- plot_ly(
type="treemap",
labels=c("Archives", "Icono", "13fi", "Matricule", "Marseille", "Salon", "Etat-Civil", "Notaire", "Aix", "Azura"),
parents=c("", "Archives", "Icono", "Archives", "Matricule", "Matricule", "Archives", "Archives", "Notaire", "Archives")
)
fig
data <- read.csv("fichier_nettoye.csv", encoding = "UTF-8")
graph <- plot_ly(
type = "treemap",
labels = data$labels,
parents = data$parent,
values = data$value
)
graph